﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="Checkoutshippingaddress.aspx.cs" Inherits="CS424_9pts.Checkoutshippingaddress" %>

<%@ Register src="Modules/ShoppingCart.ascx" tagname="ShoppingCart" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
    <div class="checkout-page">
        <div class="order-progress">
            <ul>
                <li>
                    <asp:HyperLink runat="server" ID="hlCart" Text="Cart" CssClass="active-step" NavigateUrl="~/ShoppingCart.aspx">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlAddress" Text="Address" CssClass="active-step"
                        NavigateUrl="~/Checkoutshippingaddress.aspx">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlShipping" Text="Shipping" CssClass="inactive-step">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlPayment" Text="Payment" CssClass="inactive-step">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlConfirm" Text="Confirm" CssClass="inactive-step">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlComplete" Text="Complete" CssClass="inactive-step">
                    </asp:HyperLink></li>
            </ul>
        </div>
        <div class="clear">
        </div>
        <div class="page-title">
            <h1>
                Shipping Address</h1>
        </div>
        <div class="clear">
        </div>
        <div class="checkout-data">
            <asp:Panel runat="server" ID="pnlSelectShippingAddress">
                <div class="select-address-title">
                    SelectShippingAddress
                </div>
                <div class="clear">
                </div>
                <div class="address-grid">
                    <asp:DataList DataSourceID="GetUserInfo" ID="dlShippingAddresses" runat="server" RepeatColumns="2" RepeatDirection="Horizontal"
                        RepeatLayout="Table" ItemStyle-CssClass="item-box">
                        <ItemTemplate>
                            <div class="address-item">
                                <div class="select-button">
                                    <asp:Button runat="server" ID="btnSelect" Text="ShipToThisAddress" ValidationGroup="SelectShippingAddress"
                                        OnClick="btnSelect_Click" CssClass="selectshippingaddressbutton" />
                                </div>
                                <div class="address-box">
                                    <table width="100%" cellspacing="0" cellpadding="2" border="0">
                                        <tbody>
                                            <tr>
                                                <td style="vertical-align: middle; padding-left: 15px;">
                                                    <b>
                                                        <asp:Literal ID="lFullName" runat="server" Text='<%#Eval("FullName") %>'></asp:Literal></b>
                                                </td>
                                                <td align="right" style="padding: 5px 5px 5px 0px;">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <table cellspacing="0" cellpadding="2" border="0">
                                                        <tbody>
                                                            <tr>
                                                                <td width="10">
                                                                    <%-- <img height="1" width="10" border="0" src="<%=Page.ResolveUrl("~/images/sp.gif")%>"
                                                                        alt="sp" />--%>
                                                                </td>
                                                                <td>
                                                                    <asp:Literal ID="Name" runat="server" Text='<%#Eval("FullName") %>'></asp:Literal>
                                                                    <br />
                                                                    <div>
                                                                        Email :
                                                                        <asp:Literal ID="lEmail" runat="server" Text='<%#Eval("Email") %>'></asp:Literal></div>
                                                                    <div>
                                                                        Phone :
                                                                        <asp:Literal ID="lPhoneNumber" runat="server" Text='<%#Eval("Phone") %>'></asp:Literal></div>
                                                                    <div>
                                                                        <asp:Literal ID="lAddress1" runat="server" Text='<%#Eval("Address") %>'></asp:Literal></div>
                                                          
                                                                    <div>
                                                                        <asp:Literal ID="lCity" runat="server" Text='<%#Eval("City") %>'></asp:Literal>,
                                                                    </div>
                                                               
                                                                </td>
                                                                <td width="10">
                                                                    <%--<img height="1" width="10" border="0" src="<%=Page.ResolveUrl("~/images/sp.gif")%>"
                                                                        alt="sp" />--%>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>

                </div>
            </asp:Panel>
            <div class="clear">
            </div>
            
                    <asp:SqlDataSource ID="GetUserInfo" runat="server" ConnectionString="<%$ ConnectionStrings:CarManagementConnectionString %>"
                        
                        
                        SelectCommand="SELECT aspnet_Membership.FullName, aspnet_Membership.City, aspnet_Membership.Phone, aspnet_Membership.Address as Address, aspnet_Membership.Email FROM aspnet_Membership INNER JOIN aspnet_Users ON aspnet_Membership.UserId = aspnet_Users.UserId WHERE (aspnet_Users.UserName = @UserName)">
                        <SelectParameters>
                            <asp:SessionParameter Name="UserName" SessionField="UserName" />
                        </SelectParameters>
                    </asp:SqlDataSource><div class="enter-address-title">
                <asp:Label runat="server" ID="lEnterShippingAddress"></asp:Label>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="order-summary-title">
            OrderSummary
        </div>
        <div class="clear">
        </div>
        <div class="order-summary-body">
            <%--<nopcommerce:ordersummary id="OrderSummaryControl" runat="server" isshoppingcart="false">
            </nopcommerce:ordersummary>--%>
            <uc1:ShoppingCart ID="ShoppingCart1" runat="server" />
        </div>
    </div>
</asp:Content>
